<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>My JSP 'editTeacherInfo.jsp' starting page</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <link rel="stylesheet" href="css/bootstrap.min.css">

    <style type="text/css">
        .div_ads {
            width: 75%;
            margin: 0 auto;
            margin-top: 50px;
            margin-left: 10%;
        }
        a{
            cursor: pointer
        }
        table {
            margin: 0 auto;
            width:100%;
            border-collapse:separate;
            border-spacing:0px 10px;
        }

        table tr td {
            text-align: center;
            width:150px;
            height:44px;
        }

        font{
            color:red;
            font-weight: bold;
        }
    </style>
</head>

<body>
<form action="ServletEditUserInfo" method="post">

    <div class="div_ads">
        <c:forEach var="list" items="${plist }">
            <table>
                <tr>
                    <td>账&nbsp;&nbsp;&nbsp;号：</td>
                    <td>
                        <input type="hidden" name="uid" value="${list.getUser().getUid()}">
                        <input type="text" name="unum" class="form-control" value="${list.getUser().getUnum()}" readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <td>姓&nbsp;&nbsp;&nbsp;名：</td>
                    <td><input type="text" name="uname" class="form-control" value="${list.getUser().getUname() }" /></td>
                </tr>
                <tr>
                    <td>电&nbsp;&nbsp;&nbsp;话：</td>
                    <td><input type="text"  name="phone" class="form-control" value="${list.getPhone() }"  />

                    </td>
                </tr>
                <tr>
                    <td>性&nbsp;&nbsp;&nbsp;别：</td>
                    <td>
                        <c:choose>
                            <c:when test="${list.sex==1}">
                                <input type="radio" name="sex" value="1" checked="">男
                                <input type="radio" name="sex" value="2">女
                            </c:when>
                            <c:otherwise>
                                <input type="radio" name="sex" value="1" >男
                                <input type="radio" name="sex" value="2"checked="">女
                            </c:otherwise>
                        </c:choose>

                    </td>
                </tr>
                <tr>
                    <td>年&nbsp;&nbsp;&nbsp;龄：</td>
                    <td><input type="text" name="age" class="form-control" value="${list.getAge()}" /></td>
                </tr>

                <tr>
                    <td>邮&nbsp;&nbsp;&nbsp;箱：</td>
                    <td><input type="text" name="email" class="form-control" value="${list.getEmail()}" /></td>
                </tr>

                <tr>
                    <td><input type="submit" value="修改" class="btn btn-primary" /></td>
                    <td><input type="reset" value="清空" class="btn btn-danger" /></td>
                </tr>
            </table>
        </c:forEach>
    </div>
</form>
</body>
</html>